using UnityEngine;
//using UnityEngine.Mathf;



public struct StateProperty
{
	private StaticProperty _max;
	private int _min;
	private int _current;
	public int current
	{
		get
		{
			return _current;
		}
		set
		{
			_current = Mathf.Clamp(value,_min,_max.current);
		}
	}
	
	public int Max_add
	{
		set
		{
			float ratio = _current/_max.current;
			_max.addbuffer = value;
			_current = (int)ratio*_max.current;
		}
		get
		{
			return _max.current;
		}
	}
	public int Max_mul
	{
		set
		{
			float ratio = _current/_max.current;
			_max.mulBuffer = value;
			_current = (int)ratio*_max.current;
		}
		get
		{
			return _max.current;
		}
	}
	public int Max_fullmul
	{
		set
		{
			float ratio = _current/_max.current;
			_max.fullMulBuffer = value;
			_current = (int)ratio*_max.current;
		}
		get
		{
			return _max.current;
		}
	}
	public StateProperty(int num)
	{
		_max = new StaticProperty(num);
		_current = num;
		_min = 0;
	}
}